package com.qztech.bluetooth;

import com.inuker.bluetooth.library.connect.listener.BleConnectStatusListener;

import java.util.UUID;

/**
 * Created by zhb on 2018/9/20.
 */

public class ZBtDevice {
    private int status;

    private String mac;

    private String name;

    private UUID serviceUuid;

    private UUID writeCharacterUuid;

    private UUID readCharacterUuid;

    private UUID notifyCharacterUuid;

    private BleConnectStatusListener bleConnectStatusListener;

    public ZBtDevice(){
        serviceUuid = BluetoothConfig.getServiceUuid();
        writeCharacterUuid = BluetoothConfig.getWriteCharacterUuid();
        notifyCharacterUuid = BluetoothConfig.getNotifyCharacterUuid();
        readCharacterUuid = BluetoothConfig.getReadCharacterUuid();
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    public UUID getServiceUuid() {
        return serviceUuid;
    }

    public void setServiceUuid(UUID serviceUuid) {
        this.serviceUuid = serviceUuid;
    }

    public UUID getWriteCharacterUuid() {
        return writeCharacterUuid;
    }

    public UUID getNotifyCharacterUuid() {
        return notifyCharacterUuid;
    }

    public UUID getReadCharacterUuid() {
        return readCharacterUuid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BleConnectStatusListener getBleConnectStatusListener() {
        return bleConnectStatusListener;
    }

    public void setBleConnectStatusListener(BleConnectStatusListener bleConnectStatusListener) {
        this.bleConnectStatusListener = bleConnectStatusListener;
    }

    public int getUuidCount(){
        return (writeCharacterUuid != null ? 1: 0) + (readCharacterUuid != null ? 1: 0) + (notifyCharacterUuid != null ? 1: 0);
    }

}
